import 'package:get/get.dart';
import 'package:love_newf/app/com/base/app.dart';
import 'package:love_newf/app/com/http/http_request.dart';
import 'package:love_newf/app/com/model/login_user_info_model.dart';
import 'package:love_newf/app/com/service/user_service.dart';
import 'package:love_newf/app/com/base/key_mix.dart';

class MineLogic extends GetxController {
  LoginUserInfoModel userInfoModel = App.userInfoModel;
  UserService userService = UserService();
  int couponCount = 0;
  String? name;
  List<dynamic>? mineMenus;

  bool isVerify = false;
  getMineMenus({refresh=false}) async {
   dynamic  data = await HttpRequest().get('/v3/personal-center/user-menu'.hx, null);
   mineMenus=data['list'.hx];
   isVerify = (data['cars'.hx] ?? 0) == 1;
   // name=data?['userInfo']?['username'];
   if(refresh){
     update();
   }
   return mineMenus;
  }
}
